package cn.com.server.controller.systemManage;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.server.common.AjaxCodeUtil;
import cn.com.server.common.AjaxObject;
import cn.com.server.service.NetWorkService;
import cn.com.server.extend.model.NetWorkModel;

/**
 * <p>
 * 网络配置
 * </p>
 *
 * @author qing
 * @since 2017-11-22
 */
@Controller
@RequestMapping("/systemManage/net")
public class NetWorkController {
	//netWork
	
	@Autowired
	private NetWorkService netWorkService;
	
	@RequestMapping("/netWork")
	public String netWork(HttpServletRequest request, HttpServletResponse response) {
		return "/systemManager/netWork";
	}
	
	@RequestMapping("/getNetWork")
	@ResponseBody
	public AjaxObject getNetWork(NetWorkModel model,HttpServletRequest request, HttpServletResponse response,HttpSession session) {
		AjaxObject ajaxObject = AjaxCodeUtil.getAjaxObject("success");
		ajaxObject.setData(netWorkService.selectNetWorkList(model));
		return ajaxObject;
	}
}
